﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="tm_smallAdvList.ascx.cs" Inherits="controls_smallAdvList" %>
&nbsp;<asp:GridView ID="gvItemList" runat="server" AllowPaging="True" AllowSorting="True"
    AutoGenerateColumns="False" CssClass="table" 
    Width="100%" OnSorting="gvItemList_Sorting" OnPageIndexChanging="gvItemList_PageIndexChanging">
    <PagerSettings Mode="NumericFirstLast" />
    <Columns>
        <asp:TemplateField>
            <ItemTemplate>
                <asp:CheckBox ID="cbxItem" runat="server" />
                <asp:Label ID="lblSmallAdvId" runat="server" Text='<%# Eval("advertId") %>' Visible="False"></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" Width="20px" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Chủ đề" SortExpression="subject">
            <ItemTemplate>
                <asp:HyperLink ID="HyperLink3" runat="server" NavigateUrl='<%# GetSmallAdvURL(DataBinder.Eval(Container, "DataItem.advertId").ToString()) %>'><%# DataBinder.Eval(Container, "DataItem.subject") %></asp:HyperLink>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Left" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ng&#224;y đăng" SortExpression="openDate">
            <ItemTemplate>
                <asp:Label ID="Label1" runat="server" Text='<%# GetDate((DateTime)DataBinder.Eval(Container, "DataItem.openDate")) %>'></asp:Label>
            </ItemTemplate>
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />
        </asp:TemplateField>
        <asp:TemplateField HeaderText="Ng&#224;y đ&#243;ng" SortExpression="closeDate">
            <ItemTemplate>
                <asp:Label ID="Label2" runat="server" Text='<%# GetDate((DateTime)DataBinder.Eval(Container, "DataItem.closeDate")) %>'></asp:Label>
            </ItemTemplate>
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />
        </asp:TemplateField>
        <asp:BoundField DataField="status" HeaderText="Trạng th&#225;i" SortExpression="status">
            <HeaderStyle HorizontalAlign="Center" />
            <ItemStyle HorizontalAlign="Center" VerticalAlign="Middle" Width="10%" />
        </asp:BoundField>
    </Columns>
    <PagerStyle HorizontalAlign="Right" />
</asp:GridView>
<asp:Panel ID="pnlButton" runat="server" Width="100%">
<table style="width: 100%">
    <tr>
        <td align="center" colspan="2">
            <asp:Label ID="lblMessage" runat="server"></asp:Label></td>
    </tr>
    <tr>
        <td align="left">
            &nbsp;<asp:CheckBox ID="cbxCheckAll" runat="server" AutoPostBack="True" OnCheckedChanged="cbxCheckAll_CheckedChanged" Text="Chọn tất cả " TextAlign="Left" Visible="False" /><td align="right">
            <asp:Button ID="btnExport" runat="server" CssClass="btn" OnClick="btnExport_Click"
                    Text="  Excel " /></td>
    </tr>
</table>
</asp:Panel>
<asp:Label ID="lblDebugMessage" runat="server"></asp:Label>&nbsp;
 
